SOURCES = thesis.tex
PDFTARGETS=$(patsubst %.tex, %.pdf,$(SOURCES))
DATAFILES = dd_plot.sh watt_16_streams.sh watt_4_streams.sh watt_1_streams.sh watt_128_streams.sh watt_24_streams_2nic.sh watt_256_streams_2nic.sh watt_16_streams_rs2nic.sh inaf.sh jive.sh jb.sh dwatt.sh onsala.sh tcp_dualreceive_andsend.sh groupsend_plot.sh watt_dummy_receive16_tcp.sh watt_8_nc_tcp_rands.sh watt_dummy_2nc.sh watt_2nc_rs_dummy.sh inaf_2nc_dummy.sh inaf_16_tcp.sh inaf_2_tcp.sh groupsend_plot_inaf.sh refvalues_2nic_tcp.sh refvalues_2nic_tcp.sh refvalues_2nic_tcp_rs.sh
DATATARGETS=$(patsubst %.sh, %_final.tex,$(DATAFILES))

DATAER=sh
PDFER=texi2pdf

GENTES={DATAFILES

all: plots pdfs 

plots: 
	$(foreach var,$(DATAFILES),$(DATAER) $(var);)

pdfs: 
	$(PDFER) $(SOURCES)

clean:
	'rm' -f *.aux *.bbl *.blg *.log *.out *.pdf *.toc *.eps $(DATATARGETS)
